"""
找出10000以内的完美数
"""
for i in range(1,10001):
    sum =0
    for j in range(1,i):
        if i%j == 0:
            sum += j
            if sum == i:
                print(i)